package cn.imnaer.service.rpc.collect.application;

import cn.imnaer.common.factory.TimeHelper;
import cn.imnaer.database.BaseDao;
import cn.imnaer.database.define.DBConstant;
import cn.imnaer.service.persistence.model.Collect;

public class CollectDaoImpl extends BaseDao<Collect> {

	private static CollectDaoImpl collectDaoImpl = new CollectDaoImpl();

	public static CollectDaoImpl getInstance() {
		return collectDaoImpl;
	}

	private CollectDaoImpl() {

	}

	@Override
	protected String getDbSpaceName() {
		return DBConstant.SPACE.USER_INFO_SPACE;
	}

	@Override
	protected String getDbCollectionName() {
		return DBConstant.COLLECTION.USER_COLLECT_INFO_COLLECTION;
	}

	@Override
	protected String getPrimaryKey() {

		return "groupId";
	}
 
   @Override
protected void beforeSave(Collect obj) {
	 obj.setCreateTime(TimeHelper.getCurrentTime());
}

}
